from flask import Flask
from flask_sqlalchemy import SQLAlchemy
from flask_restful import Api

db = SQLAlchemy()
api = Api()

def create_app():
    app = Flask(__name__)
    app.config.from_object('OAPro.settings.BaseConfig')

    db.init_app(app)

    from OAPro.app.views import oa
    api.init_app(oa)

    app.register_blueprint(oa,url_prefix = "/oa")
    return app